function gewParticleMaterial(effect, name)
{
  this.type = GEW_PS_SPRITE2D;
  // Streak properties
  this.streakWidth = 1.0;
  // Sprite2d properties
  this.spriteTexture = null;
  gewMaterial.call(this, effect, name);
} 

extend2(gewParticleMaterial, gewMaterial);

gewParticleMaterial.prototype.render = function() {
  var effect = this.effect;
  var scene3d = effect.scene3d;
  var gl = this.gl;
  var currPass = effect.currentPass;
  if(currPass!= this.type)
    return;
  var shader;
  switch(this.type)
  {
    case GEW_PS_POINT:
      shader = effect.shaders.point;
      break;
    case GEW_PS_STREAK:
      shader = effect.shaders.streak;
      gl.lineWidth(this.streakWidth);
      break;
    case GEW_PS_SPRITE2D:
      shader = effect.shaders.sprite2d;
      if(!this.spriteTexture||!this.spriteTexture.isReady)
        return;
      setShaderTexture(gl,this.spriteTexture.glName,shader.sprite_tex,0)
      break;
  }
  var list  = this.nodeList;
  var listLen = list.length; 
  for (var i = 0; i < listLen; i++){
    var node = list[i];
    if(!node.getFlag(NODE_FRUSTUM_IN)||!node.isVisible)
      continue;
    var model_matrix = this.nodeList[i].modelMat;
    gl.uniformMatrix4fv(shader.model_matrix, false, model_matrix.data);
    node.render(this); 
  }
}
